const { data } = require('jquery');
const Mock = require('mockjs');
const Constants = require("@/api/constants").default;
const userList = {
  url: `${Constants.localServerUrl}API_CODE_EMP_FORE_INFOLIST4OPENAPI`,
  type: "post",
  response: ({ body = '' }) => {
    const { data: { page = {}, condition } } = JSON.parse(body)
    const data = Mock.mock({
      'list|10': [{
        "id": '@id',
        "title|10-100": "@cparagraph",
        "url": "http://www.baidu.com",
        "gtidName": "@ctitle(3,5)",
        "publishDate": "2020-10-01 08:55:15",
        "views|1-100": 10
      }]
    })
    return {
      "count": 30,
      "pageNo": page.pageNo,
      "rows": page.rows,
      data: data.list
    }
  }
}

module.exports = [
  userList
]